window.addEventListener("load", init, false);

function init()
{
    document.getElementById("register_selector").addEventListener("click", switchRegister, false);
    document.getElementById("login_selector").addEventListener("click", switchLogin, false);
}

function switchRegister()
{
    document.getElementById("register_area").style.display = "block";
    document.getElementById("selector").style.display = "none";
}

function switchLogin()
{
    document.getElementById("login_area").style.display = "block";
    document.getElementById("selector").style.display = "none";
}

function returnPrincipal()
{
    document.getElementById("register_area").style.display = "none";
    document.getElementById("login_area").style.display = "none";
    document.getElementById("selector").style.display = "block";
}